﻿using Common.CustomAtteibutes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Parylene_CVD.Model.DModels
{
    // 镀膜告警事件记录表实体类
    [Table("AlarmEvents")]
    [PrimaryKey("AlarmEventId", autoIncrement = true)]
    public class AlarmEvents
    {
        public int AlarmEventId { get; set; }
        public int DeviceID { get; set; }
        public int DeviceAlarmEventId { get; set; }
        public string AlarmType { get; set; } = string.Empty;
        public int AlarmLevel { get; set; }
        public DateTime AlarmStartTime { get; set; }
        public DateTime? AlarmEndTime { get; set; }
        public DateTime? AlarmConfirmTime { get; set; }

        public AlarmEvents() { }

        public AlarmEvents(int deviceID, int deviceAlarmEventId, string alarmType, int alarmLevel, DateTime alarmStartTime)
        {
            DeviceID = deviceID;
            DeviceAlarmEventId = deviceAlarmEventId;
            AlarmType = alarmType;
            AlarmLevel = alarmLevel;
            AlarmStartTime = alarmStartTime;
        }

        public AlarmEvents(int alarmEventId, int deviceID, int deviceAlarmEventId, string alarmType, int alarmLevel, DateTime alarmStartTime, DateTime? alarmEndTime, DateTime? alarmConfirmTime)
        {
            AlarmEventId = alarmEventId;
            DeviceID = deviceID;
            DeviceAlarmEventId = deviceAlarmEventId;
            AlarmType = alarmType;
            AlarmLevel = alarmLevel;
            AlarmStartTime = alarmStartTime;
            AlarmEndTime = alarmEndTime;
            AlarmConfirmTime = alarmConfirmTime;
        }
    }
}
